package com.ophelisis.common.util;

public class CommonUtils {
	public static String nvl(String str, String replace) {
		if (str == null || str.equals("") || str.equals("null") || str.equals("undefined")) {
			return replace;
		} else {
			return str;
		}
	}
	
	@SuppressWarnings("rawtypes")
	public static String upPath(Class clazz) {
		if (clazz.getResource("").getPath().indexOf("classes") != -1) {
			return clazz.getResource("").getPath().split("classes")[0] + "filesystem";
		} else {
			return clazz.getResource("").getPath().split("classes")[0] + "filesystem";
		}
	}

	/**
	 * @param args
	 */
	public static void main(String[] args) {
	}
}
